$(function() {
	
	/*var num=$("#num").val();
	if(num>1){
		$("#pre_getPrePage").attr("class","");
		$("#pre_getFirstPage").attr("class","");
	}else{
		$("#pre_getPrePage").attr("class","disabled");
		$("#pre_getFirstPage").attr("class","disabled");
	}*/
	
	
	//点击键盘的esc键关闭模态框
	$('#userlist').modal({
		keyboard : true
	});
	
	//触发模态框的同时调用此方法  
	$('#userid').click(function(){
		var cardid=$(".center").find("#chid").val();
		/*$("#stuno").val(cardid);*/
		$.ajax({
			type : "GET",
			url : "/getCustId?custId="+cardid,    //请求的url地址
			/*data : {custId:cardid},*/
			dataType : "json",  
			async:true,
			success:function(data){
				if(data.custIdlist!=null){
					$("#custName").text(data.custIdlist.custName);
					$("#custSex").text(data.custIdlist.custSex);
					$("#custBirthAge").text(data.custIdlist.custBirthAge);
					$("#custIDcardNo").text(data.custIdlist.custIDcardNo);
					$("#custTele").text(data.custIdlist.custTele);
					$("#custHomeaAdress").text(data.custIdlist.custHomeaAdress);
					$("#custPresentAdress").text(data.custIdlist.custPresentAdress);
					$("#custJob").text(data.custIdlist.custJob);
					$("#custJobCompany").text(data.custIdlist.custJobCompany);
					$("#custCompContTele").text(data.custIdlist.custCompContTele);
					$("#custSteadyWages").text(data.custIdlist.custSteadyWages);
					$("#custMarried").text(data.custIdlist.custMarried);
					$("#custMateName").text(data.custIdlist.custMateName);
					$("#custMateTele").text(data.custIdlist.custMateTele);
					$("#custMateIDcardNo").text(data.custIdlist.custMateIDcardNo);
				}
			},
			error :function(data){
				alert("请求出现错误！");
			}
		});
	});
});
		